package day7;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr2 {
    public static void main(String[] args) {
        double []a1={1,2,3,4};//必须在定义的时候一步完成初始化
        double a2[]=new double[]{3.5,6.67,2.6,7.8};
        System.out.println(a1[0]);
        System.out.println(a2[1]);
        System.out.println("a2的长度是："+a2.length);
        System.out.println("a2的最后一个:"+a2[a2.length-1]);
        int []a3=new int[3];
        //a3={1,2,3}; error

    }
}
